
package com.zzyl.controller.customer;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.dto.NursingProjectQueryDto;
import com.zzyl.entity.NursingProject;
import com.zzyl.service.NursingProjectService;
import com.zzyl.vo.NursingProjectVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("//customer/orders/project")
public class FenyechanxunhuliliebiaoController {

    @Autowired
    private NursingProjectService nursingProjectService;


    @ApiOperation("1.1 分页查询护理项目列表")
    @GetMapping("/page")
    public ResponseResult<PageResponse<NursingProjectVo>> page(NursingProjectQueryDto dto){
        PageResponse<NursingProjectVo> page = nursingProjectService.pageQuery(dto);
        return ResponseResult.success(page);
    }


    @ApiOperation("1.2 根据编号查询护理项目信息")
    @GetMapping("{id}")
    public ResponseResult<NursingProject> getById(@PathVariable("id")Long id){
        NursingProject nursingProject = nursingProjectService.getById(id);
        return ResponseResult.success(nursingProject);
    }


}

